﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace MYData.Entity.DTO.ApiEntity.OutPut
{
    public class Project_FundtemplateOutputDto
    {
        /// <summary>
        ///经费模板主表Id
        /// </summary>
        [Key]
        [Display(Name = "经费模板主表Id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string fundtemplateId { get; set; }

        /// <summary>
        /// 项目来源ID
        /// </summary>
        [Display(Name = "项目来源ID")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string sourcePartId { get; set; }

        /// <summary>
        ///经费模板名称
        /// </summary>
        [Display(Name = "经费模板名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string fundtemplateName { get; set; }

        /// <summary>
        ///经费模板状态 0代表已启用1为未启用
        /// </summary>
        [Display(Name = "经费模板状态 0代表已启用1为未启用")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int fundtemplateState { get; set; }

        /// <summary>
        ///经费模板预算转换率
        /// </summary>
        [Display(Name = "经费模板预算转换率")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int fundtemplateFunsRatio { get; set; }

        /// <summary>
        ///经费模板预算转换率单位
        /// </summary>
        [Display(Name = "经费模板预算转换率单位")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string fundtemplateFunsRatioName { get; set; }

        /// <summary>
        ///是否包含配套经费 
        /// </summary>
        [Display(Name = "是否包含配套经费 ")]
        [Column(TypeName = "bool")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public bool isSupportingFunds { get; set; }

        public bool state { get; set; } = true;

        public List<ProjectFundingItemOutput_Dto> children { get; set; }
    }
}
